#ifndef __T0022_0_H__

#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>

#ifndef __x86_64__
#include "l0001-0/l0001-0.h"
#include "l0002-0/l0002-0.h"
#include "l0032-0/l0032-0.h"
#else
#include <syslog.h>
#define ERRSYS_FATALPRINT(format, ...) syslog(LOG_ERR | LOG_AUTH, format, ##__VA_ARGS__)
#define ERRSYS_ERRPRINT(format, ...) syslog(LOG_WARNING | LOG_AUTH, format, ##__VA_ARGS__)
#define ERRSYS_INFOPRINT(format, ...) syslog(LOG_INFO | LOG_AUTH, format, ##__VA_ARGS__)

static void *zmalloc(size_t sz) {void *p = malloc(sz); if (p != NULL) {memset(p, 0, sz);} return p;}
struct l0032_0_dxtinfost {
    
};
static void l0032_dxtinfo_close(void){}
static int l0032_dxtinfo_load(struct l0032_0_dxtinfost *xtable, const char* iniconf) {return 0;}
static struct l0032_0_dxtinfost * l0032_dxtinfo_open(const char* shmname, int bcreate) {return 0;}
#endif

#define T0022_0_VERSION							"V1.00"
#define T0022_0_OPTIONS 						"orw:lhv"

#define T0022_0_FLAGS_MODE_QUIT                 1
#define T0022_0_FLAGS_READ                      2
#define T0022_0_FLAGS_WRITE                     4
#define T0022_0_FLAGS_DXTINIT                   8

#define IS_T0022_0_QUIT(T22)                (((T22)->flags & T0022_0_FLAGS_MODE_QUIT))

struct t0022_0st {
    int flags;
    char *appname;
    char *entryname;
    int pointno;
    void *p;
};

int signal_initialize(struct t0022_0st *p);

#define A9999_0_DXT_CONFFILE    "/data/configs/a9999-0.ini"
#define A0013_0_DXT_CONFFILE    "/data/configs/a0013-0.ini"

#endif // !__T0022_0_H__